package com.neuedu.hw20190214;

public class SalesEmployee extends ColaEmployee{
    //成员变量
    private int saleValue;
    private double interest;

    //行为方法：计算销售人员工资

    public int getSalary(int month) {
        saleValue+=saleValue*interest;
        if(super.getBirthMonth()==month)
        {

            return saleValue+100;
        }
        return saleValue;
    }

    //有参的构造方法

    public SalesEmployee(String emName, int birthMonth, int saleValue, double interest) {
        super(emName, birthMonth);
        this.saleValue = saleValue;
        this.interest = interest;
    }

    //setter和getter方法

    public int getSaleValue() {
        return saleValue;
    }

    public void setSaleValue(int saleValue) {
        this.saleValue = saleValue;
    }

    public double getInterest() {
        return interest;
    }

    public void setInterest(double interest) {
        this.interest = interest;
    }

}
